from serpapi import GoogleScholarSearch
import os

def get_cite(q: str):
    api_key = os.getenv('SERP_API_KEY')
    search = GoogleScholarSearch(
        {
            "q": q,
            "api_key": api_key
        }
    )
    data = search.get_dict()
    return data["organic_results"][0]["inline_links"]["cited_by"]["total"]

q = "PEACE: Prototype lEarning Augmented transferable framework for Cross-domain rEcommendation"
print(get_cite(q))